]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
notificationDaemon.js: convert the hints dict at the beginning of the function
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Thu, 31 May 2012 09:28:41 +0000 (11:28 +0200)
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Fri, 1 Jun 2012 07:40:32 +0000 (09:40 +0200)
It's used right away to discard some Empathy notifications.

This regression has been introduced during the 3.4 cycle when 'hints' has been
turned to a GVariant.

https://bugzilla.gnome.org/show_bug.cgi?id=675370

js/ui/notificationDaemon.js

index 96f1ec92a358129044d9ea2fbefb5fdd33b6d96f..cf89733f865ac68dfc09e6249ef2b07a1baa70b5 100644 (file)
@@ -221,6 +221,13 @@ const NotificationDaemon = new Lang.Class({
         let [appName, replacesId, icon, summary, body, actions, hints, timeout] = params;
         let id;
 
+        for (let hint in hints) {
+            // unpack the variants
+            hints[hint] = hints[hint].deep_unpack();
+        }
+
+        hints = Params.parse(hints, { urgency: Urgency.NORMAL }, true);
+
         // Filter out chat, presence, calls and invitation notifications from
         // Empathy, since we handle that information from telepathyClient.js
         if (appName == 'Empathy' && (hints['category'] == 'im.received' ||
@@ -249,13 +256,6 @@ const NotificationDaemon = new Lang.Class({
             }
         }
 
-        for (let hint in hints) {
-            // unpack the variants
-            hints[hint] = hints[hint].deep_unpack();
-        }
-
-        hints = Params.parse(hints, { urgency: Urgency.NORMAL }, true);
-
         // Be compatible with the various hints for image data and image path
         // 'image-data' and 'image-path' are the latest name of these hints, introduced in 1.2